package com.mxf.code.flyweight;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Copyright (C), 2017-2022, mxf
 * Author: 28382
 * Date: 2022/10/13 18:44
 * FileName: TestFlyweightController
 * Description: 享元模式test
 */
@RestController
public class TestFlyweightController {
    @Autowired
    private Editor d;
    @GetMapping("/testFlyweight")
    public void testFlyweight(){
        d.appendCharacter('1',"黑体",16,156);
        d.appendCharacter('1',"黑体",16,156);
        d.appendCharacter('1',"黑体",16,156);
        d.display();
    }
}
